package com.shenmazong.dto;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 公司表:闫瑞
 * @TableName tb_company
 */
@TableName(value ="tb_company")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TbCompany implements Serializable {
    /**
     * 公司id
     */
    @TableId(value = "company_id",type = IdType.ASSIGN_ID)
    private Long companyId;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 公司介绍
     */
    private String companyRecommend;

    /**
     * 公司地址
     */
    private String companyAddress;

    /**
     * 公司图片
     */
    private String companyImg;

    /**
     * 公司电话
     */
    private String companyTel;

    /**
     * 公司官网
     */
    private String companyUrl;

    /**
     * 有效天数
     */
    private Integer dayNum;

    /**
     * 公司审核0未通过1通过
     */
    private Integer companyAudit;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 物理删除0未删除1删除
     */
    @TableLogic
    private Byte deleteFlag;

    /**
     * 软件id
     */
    private Long softwareId;

    /**
     * 同步es0未同步1同步
     */
    private Byte syncEs;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbCompany other = (TbCompany) that;
        return (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getCompanyRecommend() == null ? other.getCompanyRecommend() == null : this.getCompanyRecommend().equals(other.getCompanyRecommend()))
            && (this.getCompanyAddress() == null ? other.getCompanyAddress() == null : this.getCompanyAddress().equals(other.getCompanyAddress()))
            && (this.getCompanyImg() == null ? other.getCompanyImg() == null : this.getCompanyImg().equals(other.getCompanyImg()))
            && (this.getCompanyTel() == null ? other.getCompanyTel() == null : this.getCompanyTel().equals(other.getCompanyTel()))
            && (this.getCompanyUrl() == null ? other.getCompanyUrl() == null : this.getCompanyUrl().equals(other.getCompanyUrl()))
            && (this.getCompanyAudit() == null ? other.getCompanyAudit() == null : this.getCompanyAudit().equals(other.getCompanyAudit()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getCompanyRecommend() == null) ? 0 : getCompanyRecommend().hashCode());
        result = prime * result + ((getCompanyAddress() == null) ? 0 : getCompanyAddress().hashCode());
        result = prime * result + ((getCompanyImg() == null) ? 0 : getCompanyImg().hashCode());
        result = prime * result + ((getCompanyTel() == null) ? 0 : getCompanyTel().hashCode());
        result = prime * result + ((getCompanyUrl() == null) ? 0 : getCompanyUrl().hashCode());
        result = prime * result + ((getCompanyAudit() == null) ? 0 : getCompanyAudit().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", companyId=").append(companyId);
        sb.append(", companyName=").append(companyName);
        sb.append(", companyRecommend=").append(companyRecommend);
        sb.append(", companyAddress=").append(companyAddress);
        sb.append(", companyImg=").append(companyImg);
        sb.append(", companyTel=").append(companyTel);
        sb.append(", companyUrl=").append(companyUrl);
        sb.append(", companyAudit=").append(companyAudit);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}